// 变量抽离文件
import { ref, reactive, getCurrentInstance } from 'vue'
interface IRulesForm {
  mobile: string
  password: string
}
export default function useFormProperties(t: any) {
  const ruleFormRef = ref()
  const ruleForm: IRulesForm = reactive({ mobile: '', password: '' })
  const acitveName = ref('login')
  const rules = reactive({
    mobile: [
      {
        required: true,
        min: 11,
        max: 11,
        message: t('login.placeMobile'),
        trigger: 'blur'
      }
    ],
    password: [
      {
        required: true,
        message: t('login.placePass'),
        trigger: 'blur'
      }
    ]
  })
  const loginText = ref('')
  return {
    ruleFormRef,
    ruleForm,
    acitveName,
    rules,
    loginText
  }
}
